﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using CUWo.Common.Entities.WoInterface;
using CUWo.Common.Entities.WoInterface.HttpArgument;

/**
 * 创建时间：2014/11/3 15:20:51
 * 作者：yong.blackcore
 * Email：itblackhole@outlook.com
 * QQ：50404503
 */
namespace CUWo.Common.WoInterfaceCommunication
{
    /// <summary>
    /// 验证码发送
    /// </summary>
    public class CaptchaSend : CommunicationBase
    {
        public CaptchaSend()
            : base()
        { }


        /// <summary>
        /// 手机号码注册
        /// </summary>
        /// <param name="mobileNumber"></param>
        /// <returns></returns>
        public string GetUrl(string mobileNumber)
        {
            ArgsBase argsBase = base.InitHttpCommBass<ArgsCaptchaSend>();
            ArgsCaptchaSend args = argsBase as ArgsCaptchaSend;
            args.MobileNumber = mobileNumber;            
            //
            StringBuilder requestUrl = new StringBuilder();
            requestUrl.Append(base.ServiceAddress);
            requestUrl.Append(base.Method_CaptchaSend);
            requestUrl.Append("?");
            requestUrl.Append(base.ServiceAddressRequestQueryKey);
            requestUrl.Append("=");
            requestUrl.Append(JSONHelper.Serialize<ArgsCaptchaSend>(args));
            //
            LogHelper.LogInfo(requestUrl.ToString(), this.GetType(), MethodBase.GetCurrentMethod());
            //
            return requestUrl.ToString();
        }
    }
}
